package com.gp.util;

import com.baomidou.mybatisplus.core.assist.ISqlRunner;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.gp.dao.BaseAreaDao;
import com.gp.entity.BaseArea;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class ZhuanUtils {


    public static List<AddressUtis> zhuanghaun(List<BaseArea> list) {

            // 进行拆解封装
        List<AddressUtis> collect = list.stream().map(operationStation -> {
            AddressUtis stationDictVO = new AddressUtis();
            stationDictVO.setValue(operationStation.getBaseAreaid());
            stationDictVO.setLabel(operationStation.getName());
            return stationDictVO;
        }).collect(Collectors.toList());
        return collect;

    }
}

